Skip to content

[AutoDiff] make differentiable array ops inlinable #31704

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

marcrasi
Copy link

@marcrasi marcrasi commented May 11, 2020

A solver in https://github.com/borglab/SwiftFusion that had some differentiableMap and differentiableReduce in its inner loop was spending ~50% of its time in these two operations. Switching the solver to use map and reduce changed this to ~0%.

Making differentiableMap and differentiableReduce @inlinable should fix this. (Though I haven't actually built a toolchain to confirm. This isn't urgent enough that I want to spend time building a toolchain to confirm it, so I'll just wait until this makes its way into a toolchain before confirming.)

@marcrasi marcrasi requested review from rxwei and dan-zheng May 11, 2020 13:56
@marcrasi
Copy link
Author

@swift-ci please test

@marcrasi marcrasi merged commit eaa1051 into swiftlang:master May 11, 2020
@marcrasi marcrasi deleted the make-differentiable-array-ops-inlinable branch May 11, 2020 18:38
rxwei pushed a commit to rxwei/swift that referenced this pull request Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants